package com.skj.server;

import java.util.Date;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.* ;
import javax.jdo.annotations.* ;

@PersistenceCapable
public class UserRecord
{
	// 1
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
	
	// 2
	//@Persistent
    private com.google.appengine.api.users.User user;
    
    public UserRecord(com.google.appengine.api.users.User user)
    {
    	String userID = user.getUserId() ;
    	
    	// First field has to be the Java Class Name
    	key = KeyFactory.createKey("UserRecord", userID) ;
    	
    	this.user			= user ;
    }
    
    public com.google.appengine.api.users.User getUser()
    {
    	return this.user ;
    }
    
    /*public String getNickName()
    {
    	return this.nickName ;
    }*/
}

/*
// 4
@Persistent
private String firstName ;

// 5
@Persistent
private String lastName ;


// 7
@Persistent
private String gender ;

// 8
@Persistent
private Date birthDate ;

// 9
@Persistent
private String country ;

// 11
@Persistent
private PhoneNumber primaryPhone ;

// 12
@Persistent
private PhoneNumber secondaryPhone ;

// 13
@Persistent
private PostalAddress postalAddress ;

// 4
@Persistent
private Email secondaryEmail;
*/